#include<bits/stdc++.h>
#define N 100005
using namespace std;
int a[N];
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    for(int i=0;i<n;i++)cin>>a[i];
    sort(a,a+n);
    int ans=0,cur=a[0],cnt=1;
    for(int i=1;i<n;i++)
    {
        if(cur==a[i])cnt++;
        else
        {
            cur=a[i];
            ans+=cnt;
            cnt=1;
        }
        if(ans>0)ans--;
    }
    ans+=cnt;
    cout<<ans<<endl;
}
